package com.xielx.ris.statistic.enums;

import com.xielx.ris.statistic.bean.ReportRow;

import java.util.*;

public enum SheetColumnConfig{
    LEVEL1("A1000", "一级站", 2, 0),
    LEVEL2("A1001", "二级站", 3, 0),
    LEVEL3("A1002", "三级站", 4, 0),
    TOWN_HAS("A1003", "有警保合作劝导站的乡镇数量", 6, 0),
    TOWN_NUM("A1005", "乡镇数量", 7, 0),

    MBC_TOTAL("A4000","系统总录入量",2,1),
    MBC_IMPORT("A4001","批量导入量",3,1),
    MBC_BASE("A4002","重新统计的面包车基数",5,1),

    USAGE_USER("A2001","农村系统两员总量",2,2),
    USAGE_ACTIVE("A2002","农村系统活跃用户",3,2),
    USAGE_TOTAL("A2003","安装量",4,2),

    QDGZ_USER("A3001","农村系统两员总量",2,3),
    QDGZ_ACTIVE("A3002","农村系统活跃用户",3,3),
    QDGZ_WORKLOAD("A3003","劝导工作量",4,3),
    QDGZ_DAY("A3004","工作天数",5,3),

    ZDYH_FOUND("B1000","已填报",2,4),
    ZDYH_CLEAN("B1001","清理",3,4),
    ZDYH_MOVE("B1002","移置",4,4),
    ZDYH_CONTROL("B1003","临时管控",5,4),
    ZDYH_NIL("B1004","尚无明显进展",6,4),
    ;

    String code;
    String desc;
    int index;
    int sheetIndex;

    SheetColumnConfig(String code, String desc, int index, int sheetIndex) {
        this.code = code;
        this.desc = desc;
        this.index = index;
        this.sheetIndex = sheetIndex;
    }

    public static Map<Integer,SheetColumnConfig> createReportRow(int sheetIndex){
        Map<Integer,SheetColumnConfig> map = new HashMap<>();
        for (SheetColumnConfig value : values()) {
            if (value.sheetIndex == sheetIndex) {
                map.put(value.index,value);
            }
        }
        return map;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public int getIndex() {
        return index;
    }

    public int getSheetIndex() {
        return sheetIndex;
    }
}
